using System;
using System.IO;
namespace AppToolKit.Core.Utils
{
	public class StreamUtil
	{
		public static void Copy(Stream source, Stream dest)
		{
			byte[] array = new byte[source.Length];
			source.Read(array, 0, (int)source.Length);
			dest.Write(array, 0, array.Length);
			dest.Flush();
			dest.Position = 0L;
		}
		public static string AsString(Stream stream)
		{
			StreamReader streamReader = new StreamReader(stream);
			stream.Seek(0L, SeekOrigin.Begin);
			return streamReader.ReadToEnd();
		}
	}
}
